package com.zyp.factoryMethod;

public class TestFactoryMethod {

	public static void main(String[] args) {
		ICreator rc=new RedCreator();
		Light light = rc.creator();
		light.turnOn();
		light.turnOff();
		
		rc=new BlueCreator();
		light=rc.creator();
		light.turnOn();
		light.turnOff();
		
		
	}
	
}
